package com.sojson.util.swagger.use.controller;

import java.sql.SQLException;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.sojson.result.Result;
import com.sojson.util.swagger.use.entity.SwaggerUseBean;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * tags: Yapi上的接口分类名
 */
@Api(tags = "Swagger注解测试")
/**
 * Swagger2接口列表地址                        (接口路径+/swagger-ui.html)</BR>
 * Yapi导入Swagger2接口列表的地址   (接口路径+/v2/api-docs)</BR>
 */
// @RestController
// @RequestMapping("/swaggerUse")
public class SwaggerUseController {

    @PostMapping("/test.a/{name}")
    /**
     * value:       接口说明
     * notes:       接口详细说明
     * httpMethod:  请求方式
     * response:    返回参数类型
     */
    @ApiOperation(value = "添加广告", response = SwaggerUseBean.class)
    public Object test(@PathVariable("name") Integer[] swaggerUseBean) throws SQLException {
        System.out.println(java.util.Arrays.toString(swaggerUseBean));
        return Result.success();
    }

}